import axios from 'axios'

import {
  BASE_URL,
  TIME_OUT
} from './config'

const request = axios.create({
  baseURL:BASE_URL,
  timeout:TIME_OUT
})


request.interceptors.request.use(config => {

  return config
},err => {
  console.log('err' + err)
})

request.interceptors.response.use(response => {
  return response.data

},err => {
  console.log('err' + err)
})

export default request